package com.kuang.dao;

import com.kuang.pojo.User;
import com.kuang.service.UserService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DaoTest01 {
    @Test
    public void test01(){
       ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        User name = (User) context.getBean("name");
        System.out.println(name);

    }
    @Test
    public void test02(){
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
       UserService userService = (UserService) context.getBean("userService");
        userService.getUserService();

    }
}
